﻿using System;

class DecimalToHexadecimal
{
    static void Main()
    {
        //Exercise 3.
        //Write a program to convert decimal numbers to their hexadecimal representation.
        //For example: 254 -> 0xFE; 500 -> 0x1F4

        Console.Write("Enter a decimal number: ");
        int number = int.Parse(Console.ReadLine());
        string xeNumber = String.Format("{0:X}", number);

        Console.WriteLine("The hexadecimal representation of integer {0} is: 0x{1}", number,xeNumber);

    }
}

